#include <iostream>
using namespace std;

int main() {
	
	string str;
	cin>>str;
	int n=str.size();
	int nSum=0;
	for(int i=0;i<str.size();++i){
		nSum+=str[i]-'0';
	}
	str=str+str;
	int left=0,right=0;
	if(nSum%2!=0){
		cout<<"No"<<endl;
		return 0;
	}
	nSum/=2;
	int nCur=0;
	bool bFlg=false;
	while(left<n && right<str.size()){
		nCur+=str[right]-'0';
		while(nCur>nSum && left<right){
			nCur-=str[left]-'0';
			++left;
		}
		if(nCur==nSum){
			bFlg=true;
		}
		++right;
	}
	if(bFlg){
		cout<<"Yes"<<endl;
	}
	else{
		cout<<"No"<<endl;
	}
	
	return 0;
}
